package com.meida.module.bus.provider.controller;

import com.meida.common.mybatis.model.ResultBody;
import com.meida.common.springmvc.base.BaseController;
import com.meida.module.bus.client.entity.BusReceiptDeliveryRecordBack;
import com.meida.module.bus.provider.service.BusRecDeliBkReqRecordService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;


/**
 * 工程师领料冲销申请表
 *
 * @author flyme
 * @date 2020-12-02
 */
@RestController
@RequestMapping("/bus/recDeliBkReq/")
public class BusRecDeliBkReqController extends BaseController<BusRecDeliBkReqRecordService, BusReceiptDeliveryRecordBack>  {

    @ApiOperation(value = "预留发货冲销申请表-分页列表", notes = "预留发货冲销申请表分页列表")
    @GetMapping(value = "page")
    public ResultBody pageList(@RequestParam(required = false) Map params) {
        return bizService.pageList(params);
    }

    @ApiOperation(value = "预留发货冲销申请表-列表", notes = "预留发货冲销申请表列表")
    @GetMapping(value = "list")
    public ResultBody list(@RequestParam(required = false) Map params) {
        return bizService.listEntityMap(params);
    }

    @ApiOperation(value = "预留发货冲销申请表-添加", notes = "添加预留发货冲销申请表")
    @PostMapping(value = "save")
    public ResultBody save(@RequestParam(required = false) Map params) {
        return bizService.add(params);
    }

    @ApiOperation(value = "预留发货冲销申请表-更新", notes = "更新预留发货冲销申请表")
    @PostMapping(value = "update")
    public ResultBody update(@RequestParam(required = false) Map params) {
        return bizService.edit(params);
    }

    @ApiOperation(value = "预留发货冲销申请表-删除", notes = "删除预留发货冲销申请表")
    @PostMapping(value = "remove")
    public ResultBody remove(@RequestParam(required = false) Map params) {
        return bizService.delete(params);
    }


    @ApiOperation(value = "预留发货冲销申请表-详情", notes = "预留发货冲销申请表详情")
    @GetMapping(value = "get")
    public ResultBody get(@RequestParam(required = false) Map params) {
        return bizService.get(params);
    }
    /**
    * 导出预留发货冲销申请表统计
    *
    * @param params
    * @param request
    * @param response
    */
    @PostMapping(value = "export")
    public void export(@RequestParam(required = false) Map params, HttpServletRequest request, HttpServletResponse response) {
        bizService.export(params, request, response, "预留发货冲销申请表统计", "预留发货冲销申请表统计表");
    }

}
